/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Logica.Core.Plantaciones;

import Logica.Core.MateriaPrima.YerbaPropia;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

/**
 *
 * @author Luciano
 */
@Entity
public class Parcela implements Serializable {

    @Id
    private int nro;
    @Basic(optional = false)
    private double area;
    @ManyToOne
    private Plantacion miPlantacion;
    @OneToMany
    private List<YerbaPropia> misYerbas;

    public Parcela() {
    }

    public Parcela(int nro, double area, Plantacion miPlantacion, List<YerbaPropia> misYerbas) {
        this.nro = nro;
        this.area = area;
        this.miPlantacion = miPlantacion;
        this.misYerbas = misYerbas;
    }

    public int getNro() {
        return nro;
    }

    public void setNro(int nro) {
        this.nro = nro;
    }

    public double getArea() {
        return area;
    }

    public void setArea(double area) {
        this.area = area;
    }

    public Plantacion getMiPlantacion() {
        return miPlantacion;
    }

    public void setMiPlantacion(Plantacion miPlantacion) {
        this.miPlantacion = miPlantacion;
    }

    public List<YerbaPropia> getMisYerbas() {
        return misYerbas;
    }

    public void setMisYerbas(List<YerbaPropia> misYerbas) {
        this.misYerbas = misYerbas;
    }

    
}
